﻿using Basefr.Attributes;
using Basefr.Core.Entities;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Paas.Core.Sys.Entities
{
    /// <summary>
    /// 角色权限
    /// </summary>
    [MainTable(nameof(RolePermission))]
    public class RolePermission : EntityBase, IPreDefined
    {
        public int RoleId { get; set; }
        [ForeignKey(nameof(RoleId))]
        public Role Role { get; set; }

        [Required]
        [MaxLength(200)]
        public string Permission { get; set; }


        public bool IsPreDefined { get; set; }
    }
}

